// 导入请求对象
import { LoginForm, Token, MyAxiosPromise } from '@/types/data'
import http from '@/utils/http'

function login(data: LoginForm): MyAxiosPromise<Token> {
  return http({
    url: '/authorizations',
    method: 'post',
    data,
  })
}
// 获取验证码
function getSMS(mobile: string) {
  return http({
    url: `/sms/codes/${mobile}`,
    method: 'get',
  })
}

export { login, getSMS }
